package com.demoku.web.domain.demoAdmin;

import java.io.Serializable;

import org.iff.infra.util.mybatis.service.Dao;

@SuppressWarnings("serial")
public class AppType implements Serializable {

	private String id;
	private java.sql.Timestamp createTime;
	private java.sql.Timestamp updateTime;
	private String description;
	private String name;
	private String code;

	public AppType() {
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public java.sql.Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}
	
	public java.sql.Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(java.sql.Timestamp updateTime) {
		this.updateTime = updateTime;
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	

	public static AppType get(String id) {
		return Dao.queryOne("AppType_Mapping.getAppType", id);
	}

	public static void remove(String id) {
		Dao.remove("AppType_Mapping.deleteAppType", id);
	}

	public void save() {
		if (getId() == null) {
			Dao.save("AppType_Mapping.insertAppType", this);
		} else {
			Dao.save("AppType_Mapping.updateAppType", this);
		}
	}

	public void remove() {
		Dao.remove("AppType_Mapping.deleteAppType", getId());
	}
}
